package com.mou.service.order;

import com.mou.service.order.feigh.ProductFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@RestController
public class ServiceOrderNode2Application {

	@Autowired
	private ProductFeignService productFeignService;

	public static void main(String[] args) {
		SpringApplication.run(ServiceOrderNode2Application.class, args);
	}

	@GetMapping("/sayHello")
	public String sayOrderHello() {
		return "order say hello noed2!!!";
	}

	@GetMapping("/product/sayHello")
	public String sayProductHello() {
		return productFeignService.sayHello();
	}
}
